const {
  DataTypes
} = require('sequelize');
module.exports = sequelize => {
  const attributes = {
    id: {
      type: DataTypes.BIGINT,
      allowNull: false,
      defaultValue: null,
      comment: null,
      primaryKey: true,
      field: "id",
      autoIncrement: true
    },
    config_name: {
      type: DataTypes.CHAR,
      allowNull: false,
      defaultValue: null,
      comment: "配置名称",
      primaryKey: false,
      field: "config_name",
      autoIncrement: false
    },
    config_key: {
      type: DataTypes.CHAR,
      allowNull: false,
      defaultValue: null,
      comment: "配置key",
      primaryKey: false,
      field: "config_key",
      autoIncrement: false
    },
    config_value: {
      type: DataTypes.CHAR,
      allowNull: false,
      defaultValue: null,
      comment: "配置值",
      primaryKey: false,
      field: "config_value",
      autoIncrement: false
    },
    remark: {
      type: DataTypes.CHAR,
      allowNull: true,
      defaultValue: null,
      comment: "备注",
      primaryKey: false,
      field: "remark",
      autoIncrement: false
    },
    create_time: {
      type: DataTypes.DATE,
      allowNull: false,
      defaultValue: null,
      comment: "创建时间",
      primaryKey: false,
      field: "create_time",
      autoIncrement: false
    },
    create_by: {
      type: DataTypes.BIGINT,
      allowNull: false,
      defaultValue: null,
      comment: "创建人ID",
      primaryKey: false,
      field: "create_by",
      autoIncrement: false
    },
    update_time: {
      type: DataTypes.DATE,
      allowNull: true,
      defaultValue: null,
      comment: "更新时间",
      primaryKey: false,
      field: "update_time",
      autoIncrement: false
    },
    update_by: {
      type: DataTypes.BIGINT,
      allowNull: true,
      defaultValue: null,
      comment: "更新人ID",
      primaryKey: false,
      field: "update_by",
      autoIncrement: false
    },
    is_deleted: {
      type: DataTypes.INTEGER,
      allowNull: false,
      defaultValue: null,
      comment: "逻辑删除标识(0-未删除 1-已删除)",
      primaryKey: false,
      field: "is_deleted",
      autoIncrement: false
    }
  };
  const options = {
    tableName: "sys_config",
    comment: "",
    indexes: []
  };
  const SysConfigModel = sequelize.define("sys_config_model", attributes, options);
  return SysConfigModel;
};